const md5 = require('md5')
// 封装密码加密的中间件
const passwordSecret = (req, res, next) => {
  req.body['password'] = md5(
    md5(req.body['password']).slice(5, 12) + req.body['password']
  )
  next()
}

module.exports = passwordSecret